package com.droidclaimsurveyor.helper.asyntask;

import android.app.ProgressDialog;
import android.content.Context;

public class SpinnerTracker implements IProgressTracker {
	 private final ProgressDialog progressDialog;
	 private String progressLabel;

	    public SpinnerTracker(Context context,String progressLabel) {
	    	this.progressLabel = progressLabel;
	        this.progressDialog = new ProgressDialog(context);
	        this.progressDialog.setCancelable(false);
	        this.progressDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
	    }

	    @Override
	    public void onStartProgress() {
	    	progressDialog.setMessage(progressLabel);
	        progressDialog.show();
	    }

	    @Override
	    public void onStopProgress() {
	        progressDialog.dismiss();
	    }
}
